<?php

ob_start();

define('AGILET', 1);

// system root path
define('SYSTEM_ROOT_PATH', realpath(dirname(__file__)));

// new define for system application path
define('SYSTEM_MODULE_PATH', SYSTEM_ROOT_PATH . '/module');

// root path
define('SYSTEM_AGILET_PATH', SYSTEM_ROOT_PATH . '/agilet');

// library path
define('SYSTEM_LIBRARY_PATH', SYSTEM_ROOT_PATH . '/library');

// library path
define('SYSTEM_TEMPLATE_PATH', SYSTEM_ROOT_PATH . '/template');

// library path
defined('APP_ENV') or define('APP_ENV', 'production');

// define cache engine for default value
defined('CACHE_SECRET_KEY') or define('CACHE_SECRET_KEY', '');

// some thing like this but it's still not trust as everything else.
defined('CACHE_ADAPTER') or define('CACHE_ADAPTER', 'file');

defined('LOG_ADAPTER') or define('LOG_ADAPTER', 'mongo');

defined('SESSION_ADAPTER') or define('SESSION_ADAPTER', 'mongo');

defined('PROFILLING') or define('PROFILLING', false);

defined('APP_CHARSET') or define('APP_CHARSET', 'utf-8');

// define some functions.
include_once 'functions.php';

set_include_path(implode(PATH_SEPARATOR, array(
	SYSTEM_ROOT_PATH . '/agilet/class',
	SYSTEM_LIBRARY_PATH,
	//get_include_path()
)));

// include register path
include_once 'agilet/class/agilet.php';

Agilet::__init();
